package com.nbsaas.boot.manufacturing.rest.convert;

import com.nbsaas.boot.manufacturing.data.entity.ProductionPlan;
import com.nbsaas.boot.manufacturing.api.domain.request.ProductionPlanRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 生产计划请求对象转换成实体对象
*/

public class ProductionPlanEntityConvert  implements Converter<ProductionPlan, ProductionPlanRequest> {

    @Override
    public ProductionPlan convert(ProductionPlanRequest source) {
        ProductionPlan result = new ProductionPlan();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

